using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Xml;
using System.IO;

namespace MobileTDL
{
    public class ToDoList : ToDoTaskContainer
    {
        public ToDoList(XmlDocument doc, XmlElement element)
            : base(doc, element)
        {
        }

        public string CustomCommentsType
        {
            get { return GetAttribute("CUSTOMCOMMENTSTYPE").Value; }
            set { GetAttribute("CUSTOMCOMMENTSTYPE").Value = value; }
        }

        public string FileFormat
        {
            get { return GetAttribute("FILEFORMAT").Value; }
            set { GetAttribute("FILEFORMAT").Value = value; }
        }

        public string FileVersion
        {
            get { return GetAttribute("FILEVERSION").Value; }
            set { GetAttribute("FILEVERSION").Value = value; }
        }

        public string LastModified
        {
            get { return GetAttribute("LASTMODIFIED").Value; }
            set { GetAttribute("LASTMODIFIED").Value = value; }
        }

        public string NextUniqueId
        {
            get { return GetAttribute("NEXTUNIQUEID").Value; }
            set { GetAttribute("NEXTUNIQUEID").Value = value; }
        }

        public string ProjectName
        {
            get { return GetAttribute("PROJECTNAME").Value; }
            set { GetAttribute("PROJECTNAME").Value = value; }
        }

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("Custom comments type=" + CustomCommentsType);
            sb.Append(", file format=" + FileFormat);
            sb.Append(", file version=" + FileVersion);
            sb.Append(", last modified=" + LastModified);
            sb.Append(", next unique id=" + NextUniqueId);
            sb.Append(", project name=" + ProjectName);
            return sb.ToString();
        }
    }

	public enum SortType
	{
		Position,
		Priority,
		Title
	}
}
